Fix compression of serialized objects.

Due to commit 0f5550efe0b00e90b00fef80d0de4840244c15f1, compressing a
serialized object provided an inappropriate size to `s_compress_value()`
which will eventually lead to a segfault during compression. Provide the
the previously computed length instead.