Fixes to compilation errors.

Required including some additional header files.