Libraries to link should be specified in LDADD, not LDFLAGS