Fix ztimeout casts for MSVC