[test/Cmake] use proper LIBS variables in tests