Fix compilation if SSL is not used

Wrap SSL specific calls around `ifdef SSL_SUPPORT'.