merge of version that works with Ubuntu llvm 3.1 PPA

Works with https://launchpad.net/~dr-graef/+archive/llvm-3.1.quantal