Emission-line active galaxies and the cosmic X-ray background