Support conditional package installation with `--if <test>`