tools: cmake: use different approach for passing LDFLAGS