The best thing IMHO would be to put the iMac in a trolley bag (given, it wont be your regular 'cabin bag') but ive seen plenty of people with slightly larger trolley suitcases allowed through.
I have an iMac 27" and a 21" - I know how heavy they are and the original packaging (as good as it is), I doubt Emirates would allow a huge box on the cabin.
I would personally wrap it in bubble wrap and find an appropriate trolley bag.
There are some other solutions (at a price) such as
this and
this.