Work around ancient git versions

git remote wasn't available until 1.5.0

The output from git remote changed sometime after 1.6.x