Ruby 1.8.7 support to fix #26