Add guard for phantomjs.