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

Don't test if .git/HEAD file exists, but only if the .git file (or
directory) exists.
diff --git a/configure b/configure
index 7d1f4ad..8c91735 100755
--- a/configure
+++ b/configure
@@ -5691,7 +5691,7 @@
 
 
 
-if test -e $srcdir/.git/HEAD
+if test -e $srcdir/.git
 then
 # Extract the first word of "git", so it can be a program name with args.
 set dummy git; ac_word=$2