Fix the patch for missing sem_timedwait() by adding constification.