FS-6341: fix compiler warning from set but unused var
fix libcurl linking when using system libcurl
FS-6367 --resolve fix NetBSD so that it properly builds modules