ts_stdlib: add wall/werror to cflags, use pkg-config for libcheck linker