Effect of nuclear spin of a homonuclear molecule on the rate of ion capture