Update for Rust 0.7

Some minor changes are needed, to make it work on Rust 0.7