Host immune responses are necessary for density dependence in nematode infections