clone of plv8 with changes for xtuple