Update for Rust master.
Add cfg for compiling with libnative.