Fix various deprecation errors as a result of upgrading to ruby 2.0.0