Add support for Ruby 1.9 style symbol hashes

Credit goes to nobu for this patch
(https://bugs.ruby-lang.org/issues/8956#note-2).