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.
Merge pull request #50 from bphinz/buildfixes

Fixes for package builds after commit f95272d.