Added support for OpenJPEG 2.1 (fixes issue #623)

This pull request fixes issue #623. Presently it has only been tested on Mac OS X (Intel).