py: Add more #if's for configurable MOD_SYS.
diff --git a/py/builtinimport.c b/py/builtinimport.c
index 4af7dd7..3f63768 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -46,7 +46,9 @@
     // extract the list of paths
     uint path_num = 0;
     mp_obj_t *path_items;
+#if MICROPY_ENABLE_MOD_SYS
     mp_obj_list_get(mp_sys_path, &path_num, &path_items);
+#endif
 
     if (path_num == 0) {
         // mp_sys_path is empty, so just use the given file name