libdns: Fix for non-FQDN hostname.