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.