64/32 bit fix for Thread.h