- Deprecate USE_OPENSSL. It causes nothing but trouble at the moment.
- Set some environment variables needed by old build system.
- Fix build with GCC and reinstate WITH_GCC knob.
- Tidy up some nits while I am here.