Gracefully shut down PhantomJS on page load error + handle various SSL protocols