fix sem_timedwait bug introduced in timedwait unification