Fix compilation with GnuTLS

GnuTLS doesn't provide a SSL_CTX_check_private_key() function.

Closes #1254.