The equilibrium measure for an anisotropic nonlocal energy