Fixed dns.mod on QNX6/Mac OS X/Solaris
Rewrote dns.mod's autoconf checks to detect the resolver library properly on Darwin/Solaris.
Added -lsocket to the list of libraries, searched for res_* functions, in order to support QNX6.