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. 
The `typeof` check is sufficient here, there is no reason to check if it's also truthy (all Functions are truthy):

```js
var compiler = (typeof opts.compiler === 'function') ? opts.compiler : defaultCompiler;
```