Do not touch version-vcs.h if we are not in a Git repository

This fixes `make distcheck` which previously failed on the
`gitversion` rule.