mutex made into class

I can't use the boost 1.56.0  mutex since it is generating compiler
errors under mingw