Add linker flags to tests/Makefile.am