Islamic State said it killed 18 Nigerian soldiers on Sunday in the northeastern state of Borno, according to its Amaq news agency.