An automatic fitting procedure for the determination of anisotropic g-tensors from EPR studies of powder samples