COMPILER: Improve curryfication

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