Disregard some warnings during tests when cross-compiling

Previously, tests would fail in cross-compilation builds of perl
because of warnings ala this:

    Warning (mostly harmless): No library found for -lm

This happens because target systems usually have a very limited
selection of libraries to speak of.

This commit has the tests ignore those warnings on a cross-compiled
perl.