tests: use LDFLAGS to link test files - this is to make Gentoo happy