Fix: pthread_join should skip exited threads