BUG/MINOR: ssl: openssl-compat: Fix getm_ defines

LIBRESSL_VERSION_NUMBER evaluates to 0 under OpenSSL, making the condition
always true. Check for the define before checking it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>

[wt: to be backported as far as 1.9]

(cherry picked from commit b3814c2ca8a8c28a890f8f50e0a35d5247222a12)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit d0f06ab5f1f99049e17445f265d2613c01129599)
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/include/common/openssl-compat.h b/include/common/openssl-compat.h
index 0e05649..bf6a97e 100644
--- a/include/common/openssl-compat.h
+++ b/include/common/openssl-compat.h
@@ -217,7 +217,8 @@
 #define TLSEXT_signature_ecdsa      3
 #endif
 
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (LIBRESSL_VERSION_NUMBER < 0x20700000L)
+#if ((HA_OPENSSL_VERSION_NUMBER < 0x1010000fL) && (LIBRESSL_VERSION_NUMBER < 0x2070000fL)) ||\
+	defined(OPENSSL_IS_BORINGSSL)
 #define X509_getm_notBefore     X509_get_notBefore
 #define X509_getm_notAfter      X509_get_notAfter
 #endif