Added support for gethostbyname, for passing host names in addition to IP addresses.