Platform checking improved to avoid extension compilation on Jython