tracers: fix thread-id casts to 64-bit ints on 32-bit systems