Fix build when .git is a gitlink file