Use default argument values for #define_method and avoid exceptions (ruby < 2 specific, issue #2497)