Add support for JPEG-2000 compression with code 34712

Same as PR #319, on dev_4_4.

Fixes #9618.