Make it more portable and also fixed dorequest() and dns_ack6() to include IPv6 nameservers.