Non-Abelian phases from quantum Zeno dynamics