Fix old ruby

Made multiple changes that are required for compatibility with ruby 1.9.3. 
#79 should be fixed by this
`travis.yml` makes no mention of Ruby 2.1