OS X experiments

I pushed a 'use main(void)' change as push requests require a not-empty diff...
BTW 'main()' is correct too and perhaps more C++.

About OS X, I got 2 issues about the semaphore code:
 - name collision between "semaphore.h" and "Semaphore.h"
  (note it doesn't really matter because the second)
 - sem_getvalue() always fails (it links but is not implemented...)
  I tried a code using a mutex/condition variable pair with reference count
  and a memoize device to manage sharing. It works well but I prefer
  to push it after the WIN32 merge.