Fix an integer overflow issue in openJpeg