Include git commits in version output if available

Does what it says on the tin.

/cc @cgole