Update make version to check for git.

This will prevent the version from being set to null if git isn't in the
path.

Adds ability to also provide version string manually.

Fixes #6815