Updated makefile & socket.cpp to be compatible with mingw v3.8.1