Fixed fd leak in sockets on Windows