Make fast-expt iterative.