py,extmod: Some casts and minor refactors to quiet compiler warnings.
diff --git a/py/builtinimport.c b/py/builtinimport.c
index 7746e26..7a8474c 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -227,10 +227,11 @@
         do_load_from_lexer(module_obj, lex);
         return;
     }
-    #endif
+    #else
 
     // If we get here then the file was not frozen and we can't compile scripts.
     mp_raise_msg(&mp_type_ImportError, "script compilation not supported");
+    #endif
 }
 
 STATIC void chop_component(const char *start, const char **end) {