fix detection of rb_ary_subseq(), use mkmf's have_func()

* See tenderlove/racc#34 and 1b1942a0

Same as #38 but for the 1-4-stable branch.