[autotools] sync autotool build with cmake build

In addition to commit 69c2cf76cef9c190ac07726f60f1dccd3df5cb6d
diff --git a/poppler/poppler-config.h.in b/poppler/poppler-config.h.in
index eb2b1a0..6fa873e 100644
--- a/poppler/poppler-config.h.in
+++ b/poppler/poppler-config.h.in
@@ -91,7 +91,11 @@
 #endif
 
 #if defined(_WIN32)
+#ifdef _MSC_VER
 #define strtok_r strtok_s
+#elif __MINGW32__
+char * strtok_r (char *s, const char *delim, char **save_ptr);
+#endif
 #endif
 
 //------------------------------------------------------------------------