Update openssl wrapper to 1.0.1g (fixes Heartbleed)

Also add configure option to build shared libraries for ssl, and export PKG_CONFIG_PATH