added polyfills to enable phantomjs1.9