fix pthread checking