A Pakistani court has sentenced an al-Qaida-linked militant to death for plotting a suicide attack that killed a U.S. diplomat in Karachi two years ago .