ECMAScript 5 compatibility shims for legacy JavaScript engines