Leica, obviously keen to solve this problem, took a three pronged approach with the M8:
1. Don't use a full frame sensor - at this time it would be cost prohibitive and too complex to produce a sensor which can cover the entire 36x24 mm frame and still work with rangefinder lenses. For this reason the M8's sensor measures 27x18 mm (or 1.33x crop).
2. Use offset microlenses - instead of placing all microlenses directly over the photodiode they are gradually offset as you get closer to the edge of the frame (see below).
3. Know which lens is being used and apply some software correction - all new M series lenses now carry a six-bit code which allows the M8 to identify which lens is used and (optionally) apply a 'final stage' software based vignetting correction (for RAW images the lens used is simply recorded, no change is made).
Below is a diagram provided by Leica which does some way to explaining how microlenses at the edge of the frame are offset from the photodiode below them, compared to a normal microlens / photodiode combination in the center of the frame.