Local indirect least squares and average marginal effects in nonseparable structural systems