gyp: fix build with python 2.6

fix #6859