Fixed build error with ImageMagick 6.8.8 and Ruby 2.0

Fixed build error with ImageMagick 6.8.8 and Ruby 2.0 (removed deprecated functions)
Fixed build error with Windows x64
Fixed test failures


I can confirm that this builds fine on
 Windows 7 (64bit)
 with Ruby 2.0.0p353 (x64-mingw32)
 and RubyDevKit 4.7.2-x64
 and ImageMagick 6.8.8-7 Q16 x64 2014-02-13