Anisotropy of the upper critical field in the magnetic heavy-fermion superconductor URu2Si2