The GNOME-OSTree build system currently creates chroots and bind
mounts to the source tree outside the root; this means that we can't
necessarily run git inside the root, because in the case of git
submodules, the .git repository will point to outside root.
Also, error out fatally if we fail to determine the version; it
makes no sense to put UNKNOWN in e.g. the pkg-config files
since this will just cause errors later on.