Set -DBUILD_STATIC=off for package builds.

Commit f95272d set the BUILD_STATIC flag on by default, which is unnecessary for package builds.
Add in missing dependency for windows builds.

Commit f95272d created some undefined references in GnuTLS.