Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments