link pthread to fix compiline error on ubuntu 13.0

Please don't merge it.