On the way to fix mutex issues with llvm and mingw
Updated mutex for cross-compiler support