Add basic threading support
Wrappers to posix threads