Determine the property names to exclude beforehand.
Use __proto__ if available.