Make the code compatible with php-5.5

Generator class is part of the language in php-5.5. I just renamed it to FormatGenerator.