maintain compatibility with python < 2.7

see http://docs.python.org/2/library/sys.html#sys.version_info