util/os_file: replace broken windows-detection code with detect_os.h