Use Object.getOwnPropertyNames when possible