Polyfilling only if in phantomjs < 2