bugfix: add pthread dependency for posix systems.