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
Merge pull request #1 from AIM360/lars/fix-gcc4.7

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