Compiler: enable cache for method lookup

https://github.com/ocsigen/js_of_ocaml/issues/91