Compilation fixes

Tested on Linux x86 with pin-2.12-58423-gcc.4.4.7-linux and OCaml 3.12.1.