When exporting with a style we want to append the modules.

Instead of replacing the module's parameters in the image history
it is better to append the style module (as new instances) to be
able to adjust the current image (adding some light for example).

Until now the style during export was mostly usable when applying
a style with modules not in the developed images.
I suspect that all the memcpy in this legacy_params() are invalid now.
E.g. sizeof(dt_imageio_exr_t) > old_params_size, so you need to use old_params_size or it will read out-of-bounds.
Also, since style_append was added, compression is lost here.