use rb_id2sym if avaliable

In Ruby 2.2, use rb_id2sym() instead of ID2SYM().
Using rb_to_symbol() inappropriate.