Approximate conditional inference for logistic and loglinear