Fix weird issue with WindowsError and exception handling for XP