fix imagick compilation on OS X

Add explicit int64_t casts where needed. The reason we don't just change
(s)size_t types is to stay compatible with imagick's API function
signatures.