[Bug 1306047] [Patch] Use posix threads, fix static library