Update make version to check for git.

This will prevent the version from being set to null if git isn't in the
path.

Fixes #6815
There needs to be spaces after your `if`s and your `while`s.