Changes in rebuildImportMenu and rebuildExamplesMenu to allow menu scroller to work properly in Energia