How to install crown molding with uneven cabinet height?
A classic approach in cabinetry is the use of filler strips.  These are pieces of wood, matched to the finish of the cabinets that are used to fill gaps, usually between cabinets. Often the horizontal spacing does not work out to exactly the width of standard cabinets (especially in renovation work). You design to the standard sizes slightly narrower than the overall, and then add a vertical filler strip between, or at the end of a cabinet, to fill the gap. 

The same principal can be used to fill a gap between the top of the cabinet and the ceiling that will then give you a horizontal surface to attach the crown molding. A strip will probably have to be tapered to fill much of the gap, but it does not have to come down to a point because the molding will cover much of the gap. The strip can be glued into place,since it is purely cosmetic, but be careful when nailing in the crown.

The biggest question will be finish.  If the cabinets are painted, you may be able to buy a filler strip from the cabinet manufacturer and run it horizontally instead of vertically.

For stained cabinets, you can do the same, but the grain will run perpendicular to that of the cabinets. It is a matter of taste as to whether that is acceptable to you.

You also could put in a homemade filler strip (plywood, clear poplar, mdf) and paint it to match either the cabinets or the the crown molding. If yo paint it to match the crown, the effect will be that the crown looks like it is a bit deeper at that point, but probably will not be noticeable.