Fixing an issue in approx_fprime function (ticket #2993), implementing vectorized version.