Changed from std::mutex to boost::mutex, because MinGW doesn't
support std::mutex yet.