Fix compilation errors on Linux.

Linux still need the POSIX_C_SOURCE define to use sem_timedwait.
This define was removed to fix errors on FreeBSD. We add it when
we are on Linux.