The generator gradient estimator is an adjoint state method for stochastic differential equations