Fix LDFLAGS related configure errors.