OSX-friendly semaphores

Even though Xcode will compile with sem_init(), it will return an
error! The solution is to use a named semaphore via sem_open().