Fix source code to compile with current rust master branch