Added patch from JAI_IMAGEIO_CORE-194

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