HPCC-11282 OSX build error - sem_timedwait not defined

Go back to old semaphore code on OSX

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>