Fix build errors with rust-0.11
Merge pull request #1 from ccll/rust-0.11

Migrate to rust-0.11