Run correctly on OpenBSD systems without SSL_METHOD.get_cipher_by_char

Also, make sure we will compile correctly on systems where they
finally rip it out.

Fixes issue #13325.  Caused by this openbsd commit:

   ​http://marc.info/?l=openbsd-cvs&m=140768179627976&w=2

Reported by Fredzupy.
Merge remote-tracking branch 'public/bug13325_024' into maint-0.2.5