Use LDADD for extra libs rather than AM_LDFLAGS.