run close socket on Solaris, same as we do on other platforms https://bugzilla.gnome.org/show_bug.cgi?id=705188