Fix crash at client disconnect when using PolarSSL >= 1.2.6