Replace std::mutex, std::unique_lock with alternatives from Boost.Thread

Because Visual C++. See #124