If the midi message is a sustain or sostenuto, pass it on regardless of the plugin-side automation compile time switch. Also hide sustain/sostenuto CCs from the UI controls; most of the time they're for pedal noises and things like this.