This fixes a link error on Gentoo Linux by not putting -L/usr/lib in the
link command on 64-bit systems. The correct path is -L/usr/lib64, and
this is the default path used by GCC and clang.
Users may override pkg-config by setting PAM_CFLAGS and PAM_LDFLAGS in
the environment before calling configure. This is standard behavior for
the PKG_CHECK_MODULES macro.
The legacy detection logic is maintained when a path is given as an
argument to --with-pam. Note that this logic is broken when libdir is
not "lib".