Multisetting Bell inequality for qudits