build: re-add AM_LDFLAGS where it's overridden
using _LDFLAGS replaces AM_LDFLAGS rather than adding to it.