Impurity effect on the anisotropy of the upper critical field in type II superconductors