Add option to PhantomJSEnv to not immediately terminate (fix #958)