Work with older GnuTLS version (fixes #1)

Also fix the build script to work in more situations and build from source if
desired.