bpo-30232: Support Git worktree in configure.ac (#1391)

Don't test if .git/HEAD file exists, but only if the .git file (or
directory) exists.
diff --git a/configure.ac b/configure.ac
index c58322d..69d2c13 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@
 AC_SUBST(GITTAG)
 AC_SUBST(GITBRANCH)
 
-if test -e $srcdir/.git/HEAD
+if test -e $srcdir/.git
 then
 AC_CHECK_PROG(HAS_GIT, git, found, not-found)
 else