Export the finalize function from main.js.

This allows other modules to register their own extension types.