Non-linear effects and role of scattering in multiphoton imaging of thick biological samples