- Bugfix for Windows in cert path handling

diff --git a/library/x509parse.c b/library/x509parse.c
index 4234dfc..883ea25 100644
--- a/library/x509parse.c
+++ b/library/x509parse.c
@@ -60,7 +60,9 @@
 
 #if defined(POLARSSL_FS_IO)
 #include <stdio.h>
-#if !defined(_WIN32)
+#if defined(_WIN32)
+#include <strsafe.h>
+#else
 #include <sys/types.h>
 #include <dirent.h>
 #endif
@@ -1883,7 +1885,7 @@
 
     do
     {
-        if( file_data.dwAttributes & FILE_ATTRIBUTE_DIRECTORY )
+        if( file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
             continue;
 
         t_ret = x509parse_crtfile( chain, entry_name );