Discrimination of the Bell states of qudits by means of linear optics