use post-XP threading primitives on Windows