Avoid to define closesocket on POSIX systems in tests