Glassy phase in the Hamiltonian Mean Field model