Add compatibility with rmagick

Prevents missing libraries dependencies when using rmagick