Calculation of product distributions by perturbation of the transition state