First-principles calculation of EPR parameters in extended periodic systems