Use dns_* interfaces on Apple platforms

On Apple platforms, DNS resolution through libresolv behaves
differently depending on whether one uses the standard interfaces
(res_*) or Apple's "super resolver" interfaces (dns_*) that can access
the entire DNS resolver stack known to the system. Frequently, VPN
software that registers with mDNSResponder will only resolve queries
made to the latter. Using the res_* interfaces in such cases will lead
to service discovery failures.