fix GnuTLS crash on handshake errors