Nonlocal problems with singular nonlinearity