Fixed backward compatibility with Ruby 1.8
  - Tested using 1.9.2-p194
  - Tested using 1.8.7-p370