Respect LDFLAGS on one more instance

Found one more place where the ldflags were discarded, so apply same fix like last time.