add pthread in cmake