Make SSLContext's exit() handling more graceful