Fix logic error in function comparison.

The assumption that methods with the same Perl name will be guarded by
different #ifdefs only holds when the methods have been given an explicit
Perl name.
Add basic load test.
Add basic functionality test.