Make PTRACE_PEEKUSER/PTRACE_POKEUSER checks less glibc specific

* configure.ac (AC_CHECK_DECLS): Add PTRACE_PEEKUSER and
PTRACE_POKEUSER.
* defs.h: Define PTRACE_PEEKUSER and PTRACE_POKEUSER only if
they are not provided by <sys/ptrace.h>.

Reported by John Spencer.
diff --git a/configure.ac b/configure.ac
index 0cee6c5..3ea1956 100644
--- a/configure.ac
+++ b/configure.ac
@@ -274,6 +274,8 @@
 	PTRACE_O_TRACEFORK,
 	PTRACE_O_TRACESYSGOOD,
 	PTRACE_O_TRACEVFORK,
+	PTRACE_PEEKUSER,
+	PTRACE_POKEUSER,
 	PTRACE_SETOPTIONS
 ]),,, [#include <sys/ptrace.h>])
 
diff --git a/defs.h b/defs.h
index 865c83d..5b2b0ca 100644
--- a/defs.h
+++ b/defs.h
@@ -245,8 +245,10 @@
 # define PTRACE_EVENT_EXIT	6
 #endif
 
-#if !defined(__GLIBC__)
+#if !HAVE_DECL_PTRACE_PEEKUSER
 # define PTRACE_PEEKUSER PTRACE_PEEKUSR
+#endif
+#if !HAVE_DECL_PTRACE_POKEUSER
 # define PTRACE_POKEUSER PTRACE_POKEUSR
 #endif