Better C++11 wrapping
Bugfixes in C++11 semaphore