Add fallback when shutil.which isn't available