make hWaitForInput/hReady not fail with "invalid argument" on Windows