windows: avoid infinite recursion in _exception_handler