Adds toJSON mustache helper