Fix implicit function declarations Add additional #include directives and one prototype to avoid a few implicit function declarations. This ensures that the code will remain buildable with future compilers which do not support implicit function declarations.