w32: Use cast by uintptr_t for thread ID.