Issue #12326: don't test the major version of sys.platform

Use startswith, instead of ==, when testing sys.platform to support
new platforms like Linux 3 or OpenBSD 5.
8 files changed