Boko Haram insurgents attacked a military post in southern Niger, killing 16 soldiers and wounding nine more, the defence ministry has said.