dump_panic: fix win call setstdhandle return value check