Fixed possible issues with EAGAIN on Windows.