dynamically generate JS to get past CORS issues on IE8.