The maximal subgroups of the Chevalley groups G2(q) with q odd