Get thready and tests working on ubuntu.