require + ajax in browser with ES6 generators