Adapt pthread implementation to recent changes
diff --git a/library/x509_crt.c b/library/x509_crt.c
index c3dfd57..529e96b 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -959,7 +959,10 @@
 }
 
 #if defined(MBEDTLS_THREADING_PTHREAD)
-static mbedtls_threading_mutex_t readdir_mutex = PTHREAD_MUTEX_INITIALIZER;
+static mbedtls_threading_mutex_t readdir_mutex = {
+    PTHREAD_MUTEX_INITIALIZER,
+    1
+};
 #endif
 
 int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )