Deprecated method fixes

- Ruby 2.1 deprecation warnings cleanup
- C compilation warnings cleanup