Frequency entrainment for almost periodic evolution equations