Convert closesocket 'compat wrapper' to function in netbase