replace Object.keys() polyfill by a simple loop on object keys