Fermionic zero modes in the vortex field in arbitrary dimensions and index of the Dirac operator with Majorana-like interaction