perl plugin: #undef macros before poisoning them.

This fixes --enable-debug builds.