This allows to generate the `VERSION_HASH` constant with the Git commit hash even when building from a source tarball which is not a Git repository (and without dependency on Git itself). (cherry picked from commit 9a71038e34)
9a71038e34