Fixes unfinished code in timed_wait for systems without POSIX timeout support, such as Darwin

[SVN r86529]