1.0.25.41: only call pthread_kill with valid thread ids