fix build failure for ruby 2.1.0 preview1

As discussed in an short chain at issue #180. Due to ruby 2.1.0 preview API change, gtk2/gdk3 and poppler gems install failed.

* replace RBASIC(obj)->klass with RBASIC_CLASS(obj)
* add ifndef RBASIC_CLASS macro