Ruby 2.0.0 compatibility

2 changes for ruby 2.0.0 support (see detailed commit messages).