Phase Locking in Coupled Oscillators as Hybrid Automata