Add initial support for the threading libraries

Untested but will help world to be built.