Effects of the magnetic anchoring groups on spin-dependent transport properties of Ni(dmit)2 device