Some fixes to compile on Unix.