fix for llvm3.2 compatibility

Some fairly obvious changes to enable the tutorial to work with LLVM 3.2 (and hopefully beyond)