Use a more reliable method to generate resolver errors.

On some platforms even getaddrinfo is fooled by the fake NXDOMAIN results.