Mimic `WindowsError` in linux to avoid errors.