Link tests against threading lib.