Fix a bit compatible issues

for older ImageMagick and node-0.8.x