doc: Work with sphinx 1.2.3 (dev_5_0)

Fix up to work with new sphinx.  Backported to allow the old docs to continue to build.

--rebased-from #1330 

--------

Testing: will build with sphinx 1.2.3.