Third-order resonance slow extraction from alternating gradient synchrotrons