Fix cloning socket on Windows