Generate compiler directives to reflect method versions