Islamic State claimed responsibility for an attack on Kabul University on Monday that killed 22 people including students, the group’s Amaq News Agency said.