added ifdefs to cope with old versions of gnutls