libkmod: Use secure_getenv if available

"The secure_getenv() function is intended for use in general-purpose
libraries to avoid vulnerabilities that could occur if set-user-ID or
set-group-ID programs accidentally trusted the environment."
diff --git a/configure.ac b/configure.ac
index 566b317..1c6c793 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,7 @@
 #####################################################################
 
 AC_CHECK_FUNCS_ONCE(__xstat)
+AC_CHECK_FUNCS_ONCE([__secure_getenv secure_getenv])
 
 # dietlibc doesn't have st.st_mtim struct member
 AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>])