Extremum seeking control of nonlinear dynamic systems using Lie bracket approximations