Fix the build on Apple LLVM version 5.1 (clang-503.0.40).

Note that the code in which these fixes were made is dodgy: not returning
values in functions that are non-void is not supported, at least by C99.