Fix buf is undefined in IE

IE just will find the `buf` as a property of `locals` but will not to find it in the upper context.