Add OpenJPEG 2.1.0

The patch is quite ugly, if you have a better idea.
The issue is that index_t is defined in sys/types.h and there is no way to hide it, since POSIX discourages type names with _t suffix, it should be fixed upstream.