Fix deprecations.
Merge pull request #78 from lucasb-eyer/master

Fix deprecations.