Improved instrumental variables and generalized method of moments estimators