add missing map reference to image

When msCreateLegendIcon and msDrawLegendIcon are called from mapscript directly, the image does not have a map assigned. This causes a crash when the legend references a symbol as in the maprendering.c getTile function and tries to get the font from the image's map fontset reference.