Phase-matched third-harmonic generation via doubly resonant optical surface modes in 1D photonic crystals