Fix build with libressl 2.7.x/2.9.x
rather than hardcoding version numbers with ifdefs, we simply check whether the functionality is available or not.
rather than hardcoding version numbers with ifdefs, we simply check whether the functionality is available or not.