Add support for generator functions from ecmascript 6