More portable fetch_dependencies.sh script