Issue #16537: Check whether self.extensions is empty in setup.py.

Patch by Jonathan Hosmer.