[runtime] Fix the unregistration of our exception handler on windows. Fixes #23221.