Added -lpthread to build.