Update pthread.hpp

fixed crashes when cancel/detach/kill called fot tid_ == 0