Add pthread library to link.