How should one use rb_reg_regsub in a library that is ment to be used
both from 1.8 and 1.9?  1.9 changed the parameter list, but the name
of the function is still the same.

I currently have the following  quickly hacked together, so please
comment  test in my extconf.rb

checking_for 'number of arguments to rb_reg_regsub' do
  $defs.push '-DHAVE_RB_REG_REGSUB4' if try_compile <<EOC
include <ruby.
int
main(void)
{
    rb_reg_regsub(Qnil, Qnil, NULL, Qnil);
    return 0;
}
EOC
end

Is there a better way of dealing with this inconsistency?

Thanks!