compatability with rustc v0.12

fixes for errors when compiling with rustc v0.12 which I believe are due to changes in the language.