Work around what seems like an bug in automake 1.14

"AM_INIT_AUTOMAKE(foreign) dnl ..." seems to trigger Debian bug#738716
Retrieve libperl linking information from ExtUtils::Embed as suggested by perlembed(1)

perl -MConfig -e 'print $Config{ldflags}' gave me

    -lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt

with Perl 5.18 as configured on Debian/unstable.