fix setting of LDFLAGS