build with ruby 2.2

not tested running with ruby 2.2 yet.  this patch only support to build.