Darwin doesn't implement sem_init() so we need to use Mach semaphores instead.