write-headless-jar: adjust to current headless support

The headless support migrated to ImageJ2 for better maintaining and
more robust unit testing. The way the headless.jar can be written
changed, too...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>