Issue buildwarnings

Current imagick extension build raises a lot of warnings.
I'm trying to fix "most of them"

More commits will follow.