Add ruby 2.2 compatibility.
Merge pull request #47 from Exoth/master

Add ruby 2.2 compatibility.