perl plugin: #undef macros before poisoning them.

This fixes --enable-debug builds.
Merge pull request #396 from radford/perl-debug-compile-fix

perl plugin: #undef macros before poisoning them.