Add a workaround for zlib:inflate mishandling of incomplete buffers

zlib:inflate/2 seems to fail with a data_error error when given an
incomplete data buffer, then providing the remaining chunk in a following
call.