President Ashraf Ghani says group linked to ISIL claimed responsibility for attacks that killed at least 35 people.