mitigite build error

hsmagick 0.5 failed to build with `Not in scope: ‘unsafePerformIO’` errors. I tried to fix it. Please look over it and consider merging it.

sincerely,

nek0