Hamiltonian formulation of two-dimensional gauge theories on the light cone