Added two missing libraries to the linker flags and using -z defs to make sure that the linker fails any undefined symbols in the library
Simplified the tests Makefile while fixing it so that 32-bit make check works