Convert vec::raw::to_ptr(*) to *.as_ptr()

New version of Rust master removed the vec::raw::to_ptr function and replaced it with as_ptr.