Dynamical localization for two-level systems periodically driven