Add patch from JAI_IMAGEIO_CORE-194

See https://java.net/jira/browse/JAI_IMAGEIO_CORE-194