Replacing sem_init() by sem_open()

On Mac OS X, named semaphore have to be used instead of unnamed
semaphores. Indeed, while <semaphore.h> declares sem_init() so that it
compiles properly on OS X, it returns -1 with errno set to ENOSYS
(function not implemented).
So we have to use sem_open() instead of sem_init(), and sem_close() and
sem_unlink() instead of sem_destroy().
some modifs on sem_open ,writes
sem - basicTest
Fix: testBasic.c with the modifications of the semaphores

The behaviour of the code while running tests/integration/basic/testBasic.c
is now acceptable.
XXX: when running the test with valgrind, a warning of type "invalid read of size xx"
is displayed
Delete a print("%p"...) which was there for debugging purpose
Makefile: build binary on OS X
Merge branch 'compatibility' into jni

Conflicts:
	src/interface.c