A computational algorithm for the Green's function method of sensitivity analysis in chemical kinetics