make ruby 1.8.7, 1.9.3, and 2.0.0 compatible