Fix missing pthread library linkage on ubuntu for building tests