Add -lsocket to LIBS if libsocket has socket(). Solaris needs this.