Example code for  http://pagesofinterest.net/blog/2013/03/constructing-js-objects-in-cpp