Make version check compatible with Python 2.6