Quite frankly, I don't think they would bother to investigate that much, if they ever stop you for a check. A huge box, although wrapped with paper, can atrract too much of attention, I gather... So, think about it.
If you are to put the iMac into you checked in luggage you would probably want to remove the hard drive and find a piece of hard plastic or whatever of a decent size to put it against the LCD before wrapping the whole thing with clothes or whatever protection. The CD drive could also suffer from harsh airport treatments but it is certainly much less sensitive. Removing the HDD might void you warranty though...
The best way is certainly to take it to the cabin as your hand luggage, after removing the stand, of course. A 20"er will fit into cabin compartments for sure, a 24"er... - my guess is, that it will too, you can always put it under you seat acodring to most carriers rules. You sould check how many hand luggage items are allowed per person by the company you are flying with, to avoid troubles.
An iMac, being quite large, is very slim (without the stand of course), it is almost as slim as a painting, which you certainly can carry with you. You can always argue at the check in, should there be any questions, that it is an extremely fragile and valuable item and there is no way it is going to check in. A decent company will most probably meet you requirements. There may be a problem with overweight for a hand luggade. Yet again, check it out with you carrier.
I know somebody who just didn't show all his hand luggage items at the check in stand, fetched it from his buddy before going to the security check, and the unshown item made it happily to its destination. You mileage may vary though, and it is certainly NOT an advice, just a piece of information.
Good luck, anyway.