compat.sh: Restore testing against OpenSSL for pre 1.2 TLS versions

Restore compatibiltiy testing against OpenSSL for
(D)TLS versions smaller that 1.2.

. Fix the check for support in OpenSSL for these versions
. For test cases for (D)TLS version smaller than 1.2,
  restore the configuration of OpenSSL client/server
  with the given TLS version, as it was before #5660
  that broke it.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
diff --git a/tests/compat.sh b/tests/compat.sh
index ee2d460..6791c55 100755
--- a/tests/compat.sh
+++ b/tests/compat.sh
@@ -867,12 +867,15 @@
     G_MODE=""
     case "$MODE" in
         "ssl3")
+            O_MODE="ssl3"
             G_PRIO_MODE="+VERS-SSL3.0"
             ;;
         "tls1")
+            O_MODE="tls1"
             G_PRIO_MODE="+VERS-TLS1.0"
             ;;
         "tls1_1")
+            O_MODE="tls1_1"
             G_PRIO_MODE="+VERS-TLS1.1"
             ;;
         "tls12")
@@ -880,6 +883,7 @@
             G_PRIO_MODE="+VERS-TLS1.2"
             ;;
         "dtls1")
+            O_MODE="dtls1"
             G_PRIO_MODE="+VERS-DTLS1.0"
             G_MODE="-u"
             ;;