Fixes for require.undef with loader plugins