Better sysctl test detection.

Closes #12408
Pylint