Merge pull request #4661 from laomaiweng/patch-1 streams: openssl: add missing check on OPENSSL_LEGACY_API