Make library set system dependent

For instance, FreeBSD doesn't need -lresolv, -ldl

(note: I haven't tested this on Linux, please do)