Add support for ruby 2.1

Since PARRAY_PTR macro has been changed in Ruby 2.1, we need to use C-APIs instead.