Finite-size effects and analytical modeling of electrostatic force microscopy applied to dielectric films