Added support for linking with POSIX threads library