Fix Python version detection for versions 3.4+

Python 3.4+ reports the version number differently.
(http://bugs.python.org/issue18338)