patch for es6 generator support