Fix error reporting under Win32 (CreateFile does not set errno)