Removed std::mutex and replaced it with boost::mutex. Not all compilers support C++11.