Do a better job of detecting the resolv library.