Fix the deprecation warning in DnsNameResolver