fixed compatibility test for py < 2.6