tls: fix compilation when both gnutls and openssl are enabled