Add shared pointer support in javascript

All is said