Closes #4589 (which most likely applied for all OS's). At some point it seems this change was removed from sysconfig by accident, this adds it back and also adds a check to the CI to make sure its caught in the future.
edit: Removed in #4569 which I also approved 😄