fixed build error on Ruby 1.9
Merge pull request #508 from hsbt/fix-ruby19

Fixed build error on Ruby 1.9