restore 1.8.7-compatibility

I will be very excited when we can drop 1.8 and 1.9 and use all the new
fancy Ruby stuffs.