Merge pull request #5087 from gilles-peskine-arm/test_ssl_o2-2.x

Backport 2.x: Build with -O2 when running ssl-opt