Extrapolation of the 12C+12C and 12C+16O Reaction Cross Sections to Astrophysical Energies