avoid deprecated rb_thread_blocking_region

This is for compatibility with future releases of mainline ruby,
as rb_thread_blocking_region is removed in r44955 of ruby trunk.
I've tested this with the following Rubies:

ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
ruby 2.2.0dev (2014-02-15 trunk 44966) [x86_64-linux]
rubinius 2.2.4.n35 (2.1.0 fa307b6a 2014-02-04 JI) [x86_64-linux-gnu]
up version to 1.2.2