some fixes for building with 0.11

Just some fixes for changes introduced the in 0.11. Also added cargo support. Didn't fix any of the string changes introduced. Hope this helps.