build: add missing ldflags to exe and shared