imapproxy got support for some features only provided by OpenSSL 1.0.1+. This patch brings the necessary #ifdef to build it against older 0.9.8 trees of OpenSSL.
This patch also fixes a crash in case ICC_Invalidate() is called for a STARTTLS connection. After ICC_Invalidate() is called ICC->server_conn->tls is freed and not valid anymore. But ICC_Recycle calls SSL_Shutdown/Free again since the pointer is not cleared.
Patch is against 20150108svn14486.
SSL_Shutdown crash bug was fixed separately. The OpenSSL patch has been applied, thank you.