harmony gold swings to profit, declares dividend