Improve Cargo build.

Also adds support for Android.