Analysis of image formation in a near-field scanning optical microscope: effects of multiple scattering