Fixes for compatibility with mozilla/rust

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