Apple is aggressively cutting costs, CEO Tim Cook says layoffs not ruled out