Use LDLIBS not LDFLAGS