Fix compilation on OS X 10.9 (or anywhere else with a C++11 compiler)

unique_lock and friends is ambigious when using namespace std and boost, at
least with C++11.