Approximate methods for the optical characterization of inhomogeneous thin films: Applications to silicon nitride films