Actually, that wouldn't work, because you still have to define the function conditionally.

Just leave it where it is, but add a comment explaining why it's needed.