Update to work with phantomjs 1.9

Script wasn't working with newer version of phantomjs.