added code to allow compilation with either OpenSSL or BSAFE