make the `isGenerator()` function more generic

For some background, see this Twitter conversation:
https://twitter.com/TooTallNate/status/397185683162288128

tl;dr this works with both regenerator as well as native V8 generators,
and it is probably faster in general, so hey why not. Yay JS………