Cutoff frequencies in optical fibers of arbitrary refractive index profile using the resonance technique