fixing bug #120870 try to avoid problem with uninitialized mutexes Daniel

* globals.c threads.c: fixing bug #120870 try to avoid problem
  with uninitialized mutexes
Daniel
diff --git a/globals.c b/globals.c
index 5342340..2cddaa8 100644
--- a/globals.c
+++ b/globals.c
@@ -480,6 +480,9 @@
     /*
      * Perform initialization as required by libxml
      */
+    if (xmlThrDefMutex == NULL)
+        xmlInitGlobals();
+
     xmlMutexLock(xmlThrDefMutex);
 
 #ifdef LIBXML_DOCB_ENABLED