Use Object.getOwnPropertyNames for compatibility with native promises