CMake: Don't fail if GIT_HEAD could not be found
CMake: Add support for packed refs in .git/HEAD
CMake: Use `git` to determine HEAD if available