minimal changes to compile with rustc nightly (0.11-pre 33c3edd 2014-05-23).