Add ifdef around pulse-specific code.