Back to toJSON for syncedAttributes

We need the full set of attributes persisted to the server.  The
previous approach won't work if toJSON is overridden.