Use polling instead of boost's broken semaphore on OSX