Support Ruby 2.1

TRAP_BEG/TRAP_END and rb_thread_blocking_region is removed from Ruby 2.2.0. I fixed build error and use rb_thread_call_without_gvl instead of rb_thread_blocking_region.