tweak optional_deps conditional, i.e. if var is undefined