Fixing compilation issues due to missing headers and defines.