Makefile.am: Fix build hang when .git and Git are present but don't work.