What if we just use simple code for this as @jrburke has done in https://github.com/requirejs/text/blob/master/text.js#L23