osdep: fix socket_error() to work with Mingw64