Fixes for compatibility with Rust master

* "extern mod" is now "extern crate"
* std::ptr::to_unsafe_ptr has been removed
Merge pull request #45 from reima/master

Fixes for compatibility with Rust master