fix 'keys' bug

(The latest version of JS introduces a new Object.keys property, which
leads to some name collisions in our scripts.)
Merge pull request #272 from gberriz/keys_bug

fix 'keys' bug