Apple reports 5.8% rise in profits ahead of IPhone X sales