Fix compatibility with Ruby 1.9

Suggested-by: Daniel Heath <daniel@heath.cc>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>