fixed build error with Ruby 2.2.0

I fixed build error with Ruby 2.2.0, this fixes is similar solution of https://github.com/tarcieri/cool.io/commit/a908df724d0090be7cfb784ea3c49046b44e93d5