Fix compile errors for latest Rust