Fixes #9767 (bootstamp generation causes error in case of corrupt Windows Event Log) and #9911 (get_tmp_base_dir(...) failure)