adapting C++ to older v8 API