On the index of a holomorphic vector field tangent to a singular variety