glib2: support Ruby head

Codes for Ruby 1.8 are dropped.