Fix deprecation warnings.
Merge pull request #16 from ntessore/pr47b93ec

Fix deprecation warnings.