check_os_dependency: don't use which and avoid locate