Make compatible with 0.10 API
Merge pull request #2 from aredridel/master

Fix build with 0.10