Serialize lua objects into a binary block