Openssl compilation fix for 1.9.3, 1.9.2, ree

As discussed in #2539. I hope I got it right.