Moved LDFLAGS to the end of the command to get around `--as-needed`