makefile.shared: respect LDFLAGS when linking