pretty-printing hack for JS.Value and Resource