Check session_cert is not NULL before dereferencing it

Fix CVE-2014-3470

http://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=a5362db4603910b1bb978163e0e7dc8890727300