Fix crash at client disconnect when using PolarSSL >= 1.2.6
Fix using /dev/urandom since it wasn't working