diff --git a/library/libxlsxwriter/third_party/md5/md5.c b/library/libxlsxwriter/third_party/md5/md5.c
index b235e17..ce98e18 100644
--- a/library/libxlsxwriter/third_party/md5/md5.c
+++ b/library/libxlsxwriter/third_party/md5/md5.c
@@ -35,7 +35,11 @@
  * compile-time configuration.
  */
 
-#ifndef HAVE_OPENSSL
+#ifdef PHP_WIN32
+#include "config.w32.h"
+#endif
+
+#ifndef HAVE_OPENSSL_EXT
 
 #include <string.h>
 
diff --git a/library/libxlsxwriter/third_party/md5/md5.h b/library/libxlsxwriter/third_party/md5/md5.h
index 2da44bf..3cb0a98 100644
--- a/library/libxlsxwriter/third_party/md5/md5.h
+++ b/library/libxlsxwriter/third_party/md5/md5.h
@@ -23,7 +23,7 @@
  * See md5.c for more information.
  */
 
-#ifdef HAVE_OPENSSL
+#ifdef HAVE_OPENSSL_EXT
 #include <openssl/md5.h>
 #elif !defined(_MD5_H)
 #define _MD5_H
