Fix version checking to support Python 2.6.