fix NULL-dereference when calling connect method on socket object lacking host address information