Avoiding restarting jsdom/phantom on typical JS errors