Sulfenylation and selenylation of nitriles