sem_init() workaround for OS X