phantomJS xhr workaround