fixed issue with tests on Firefox by making detection of generator functions work across browsers