compiles with master branch of rustc
Merge pull request #2 from dsyang/master

Fix errors to compile under rustc 0.11