Changes in Javascript plugin to compile under new mesh api