add `opts.compiler` allows third party to override the internal compiler

I read the comments that @lazd made in other posts. Here is my version of rolling out the User custom compiler. 
If this output changes, please update it (not sure if it does).