Redo the Sphinx check to do the same thing on all platforms.

This also fixes the bug where the Sphinx version gets detected as
"Sphinx vX.Y.Z" instead of "X.Y.Z" on Unix-like systems.