compiles with threads support