moved common swig v8 definitions in javascriptruntime.swg, fixed obsoleted api calls