added missing -lpthread flag for cpptests compilation on Ubuntu