Fix for older versions of imagemagick