normalise LDFLAGS handling