Add support for ES6 generators that works in both V8 and SpiderMonkey