fix(minErr): remove references to internals APIs

So that we can use minErr with angular-loader, before full angular is loaded.

This also fixes replacing the version during the build.
fix(loader): don't rely on internal APIs

Closes #4437
Closes #4874