Added sem_timedwait replacement.