Fixed setter define_methods for Ruby 1.8 support