configure.ac: Actually check the CFLAGS and LDFLAGS returned by ExtUtils::Embed before deciding to compile the Perl plugin.

- openSUSE has ExtUtils::Embed, EXTERN.h and perl.so in the base perl package.
- Fedora has ExtUtils::Embed in a separate perl-devel package.
- Mageia has ExtUtils::Embed in the base perl package but EXTERN.h in a separate perl-devel package. Without this package, the compiler complains about the missing header.
- Debian has ExtUtils::Embed and EXTERN.h in the base perl package but perl.so in a separate libperl-dev package. Without this package, gcc compiles successfully but complains at link-time about -lperl (ExtUtils::Embed returns '-lperl' in ldopts but it's not actually installed).

configure.ac already requires ExtUtil::Embed to enable perl. To handle the case of Mageia and Debian, this change uses AC_TRY_LINK to verify that the flags returned by ExtUtils::Embed can actually be used to compile before deciding to enable the perl plugin.