tests: correct the dummy setup for LDFLAGS. suggested by Anton Bolshakov
tests: use LDFLAGS to link test files - this is to make Gentoo happy