Instrumental variable estimation of nonseparable models