Fix build with older TLS library versions