Fix classpath issues in the autogen component

Backport of ```a2d1d1a``` from https://github.com/openmicroscopy/bioformats/pull/421