Refactor build boot process

Move loader and flag parsing out of "if shadowdom polyfill" branch code

This change makes the "native" build possible