Applied Moritz' fix for socklen_t on Solaris