Convert to using ES5 syntax only.

Ported from vingtetun's branch by asuth
Merge pull request #1 from asutherland/es5-syntax-only

Convert to using ES5 syntax only. r=asuth, rs=squib