Make WaitForSingleObject blocking.