Make Ruby 1.8.7 happy; to be rebased into e5efd86 after code review