Webkit: Use local variable for buffer

There can be some troubles when using a global variable with a common
name (buffer). It is better use (let ...).