add isGenerator check for regenerator polyfill