Metastability in the Hamiltonian Mean Field model and Kuramoto model