doc: fix Sphinx version detection