rt.dmain2: Fix Issue 11865 - Unhandled exception does not show crash dialog

If a console window is not present, display uncaught exceptions
in a standard Windows message box.