def and define_method return the method name.

This is a Ruby 2.1 change, but as we previously returned nil, this is unlikely to be a compatibility issue.