Fixed semaphore on OSX.