Compiler exports

Implements two changes that make it slightly easier for 3rd party libs to extend the library behavior.