Support for Ruby 1.8.7

Signed-off-by: Aymeric Brisse <aymeric.brisse@perfect-memory.com>