fix preprocessor macro usage in generator code