Ruby 1.8 alternative to define_singleton_method