[package] common.sh: fix variable substitutions in build_in_env