Require support of Object.keys for cache collect tests.

Enforce the requirement of Object.keys to prevent cache collection tests from failing on old (unsupported) environments.