Build tests with -threaded