if phantom is not defined, can't phantom.exit - closes #344