Ensure object output streams get flushed. Fixes #54.