Fixes for building under Ruby 1.8.7
Merge branch 'refs/heads/pr/483' into 2.2-stable