Fix doc generation under ocaml 4 - based on xapi-project/ocamldoc-json

Thanks to Rob Hoes for this fix.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>