Fixing doctests by running them only on Python 2.7