fix socket compile error for mingw