Fixed compile with 5.5. Added VC11 compatibility

*renamed generator.php and related functions/classes to get around
keyword issue in > 5.5
Fix generator now being a reserved word and support newer MSVC versions