windows: Properly set errno for read/write functions using Winsock