added cors support for loading and instrumenting remote scripts