add mpfr support for cos and tan
Remove duplicated external declarations
Fix for OCaml 4.02 and compatibility with -safe-string