Include commit hash in version output

Extracting the abbreviated commit hash will break when git will be
replaced by a different version control system.  But until it does,
get the hash from the git repository.