Global asymptotic stabilization of second-order nonlinear systems by inverse optimal control