Add implementation for ElementWrapper.toJSONSync

This function is necessary to get the right behavior in gremlin-repl
when using node's REPL.