Convert to using ES5 syntax only.

Ported from vingtetun's branch by asuth

r=asuth, rs=squib