Use pg_index's indnatts when indnkeyatts is not available
Using NULL when this column is not available does not work with old
PostgreSQL (tested on version 9.6, as reported in #12600).
Instead, use `indnatts` which should be equal to what `indnkeyatts` would be
as there is no "included attributes" in the index on these old versions
(but only "key columns").
From https://www.postgresql.org/docs/17/catalog-pg-index.html:
* `indnatts`, "The total number of columns in the index [...]; this number
includes both key and included attributes"
* `indnkeyatts`, "The number of key columns in the index, not counting any
included columns [...]"