Use dispatch_semaphore as anonymous semaphore on OS X