You should start to specify a version on command line, e.g., swig -javascript -v8 -DSWIG_V8_VERSION=0x032007