Fix comparison test on 2.x.