Update generator.class.php

In PHP 5.5 they introduced an internal global class called Generator (http://php.net/manual/en/language.generators.overview.php)