Generalized indirect inference for discrete choice models