Fix crash in Chrome when Enable Experimental JavaScript features is enabled

having `encode_param_name,` and 
`object_to_params,` declared as variables before later being declared as a function causes a fatal bug in Chrome with the es6 flag ticked.

Is this kind of redeclaration illegal?