Fix not link to Imagick lib error
Fix metadata release segfault