Torstar Corp. swings to profit as cost-cutting offsets impact of lower revenue