Fixes for compatibility with mozilla/rust:master

* "extern mod" is now "extern crate"
* std::ptr::to_unsafe_ptr has been removed