Use major.minor format in the version string of the sphinx configuration file

Only the first three characters of `sphinx.__version__` are used to compare with `needs_sphinx`. This patch fixes a bug reported to the astropy mailing list by Russell Hewett.