Update for Rust 0.13

Make it compile and fix some warnings.