Update to latest rust + a couple other fixes

I updated this to compile with the latest version of Rust. I also corrected the link annotation on Windows, and updated Cargo.toml so the library can be used as a cargo dependency.