Fix WAIT polling interval on POSIX platforms

WAIT with a timeout internally encodes the timeout in milliseconds. The actual POSIX host implementation however inadvertently uses this value as a timeout in microseconds. This leads to a de-facto busy loop when WAITing, as the
internal timeouts are simply too short.

Originally discovered by Richard Smolak. Independently reported by Bohdan Lechnowsky.