On a singular semilinear elliptic problem with an asymptotically linear nonlinearity