Make sm compile with different Python versions