Nonresonance below the first eigenvalue for a semilinear elliptic problem