Small fixes for building integrated document.
This assumes that sphinx is called to build a singlehtml.