On the Fredholm alternative for nonlinear operators