Existence of periodic solutions of dynamic equations on time scales by averaging