WIP: closer to compiling

Note that this code required minor changes to Imglib's img-metadata branch.
I have pushed those changes to img-metadata-changes and am awaiting feedback.