Fix dumpthreads to use proper Thread.object_id

Fixes crash with SIGUSR2.