Interaction between a dielectric tip and an ionic crystal. Application to scanning force microscopy on LiF and MgO