Approximating the Bayesian inverse for nonlinear dynamical systems