Add ../../lib/libdns.a to some places to fix linking errors

It might be because of the Debian patch (which changes some linking), but I need this patch to stop seeing missing symbols on several places.

Could you please review (and possibly merge)?