Ruby 1 9 support

Changes need to use with Ruby 1.9.3. This has been tested as well.