Fixing javascript evaluation code for some 2.6 versions