Fix appending Git date and commit hash to version number
* Look for git, so that GIT_FOUND is actually set if git is available * Check if the source code is a git checkout * Append the date of the last commit before the commit hash for correct sorting of version numbers