make cuda compile work with llvm 3.4
NVPTX doesn't sanitize names in llvm 3.4, so we have to do it ourself.