Mangle global names correctly