Fixed destructor in named semaphores
Fixed destructor in named semaphores

- sem_destroy() is not implemented in OS X.
- Unnamed semaphores should use sem_close() instead of sem_destroy().

MRPT/mrpt,MRPT/mrpt,MRPT/mrpt,MRPT/mrpt,MRPT/mrpt