Port OpenSSL build fixes from master.