Fix compile errors with latest Rust