Update to use new Composer plugin API

Replaces #6