static/scriptengine: use Handle instead of Persistence

fixes #569

v2: make it compatible with older versions of v8