Allow use of imagemagick with docsplit

After looking at https://github.com/chintanparikh/docsplit/commi/6cff4e717f896096af6f3a71a7af9d1c38be7c33, I realized it would be relatively easy to get docsplit to work with both ImageMagick and GraphicsMagick. This was important to me as I didn't want to have to require both toolchains (which are extremely similar) for one package. This approach involves minimal changes to the codebase and passes the test suite under both IM and GM.