On Windows the warning/error messages print opt.exe instead of opt, so just drop this part of the check.