Fix mtx_timedlock for systems without pthread_mutex_timedlock.

This most notably includes OS X.  The implementation will just call
trylock and sleep for 5ms until successful or the timeout was reached,
so it will be a bit slower than the pthread_mutex_timedlock version.

https://github.com/tinycthread/tinycthread/issues/15