tools: cmake: import upstream patch for OpenSSL 1.1.x compatibility