Variable-phaseS-matrix calculations for asymmetric potentials and dielectrics