tools: cmake: import another upstream commit for OpenSSL backwards compatibility