Cohomology of an elementary topos