An algorithm for numerical integration based on quasi-interpolating splines