Add isArray polyfill and add comments to sgf.js