Fixed compile with 5.5. Added VC11 compatibility

*renamed generator.php and related functions/classes to get around
keyword issue in > 5.5