Fix the plugin for DFHack r4.

I'm thinking this probably breaks r3, unfortunately. It seems to me that we are
moving away from r3 anyway though.