Strategies for fitting nonlinear ecological models in R, AD Model Builder, and BUGS