Fix Python detection for Python 3.x

  File "<string>", line 1
    import sys; print sys.version_info[:2]
                        ^
SyntaxError: invalid syntax
Workaround for tests in Python 3.4

see http://bugs.python.org/issue21750