Add a workaround for the std::this_thread::yield bug in g++ 4.7

c.f. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680
http://gcc.gnu.org/ml/libstdc++-cvs/2012-q4/msg00045.html