Fixed gems 1’s compilation errors with newer cc

I fixed some compilation errors for gems 1, such that it can be compiled on Mac/Linux using:
 * Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
 * cc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3

My changes:
 * Added function declarations.
 * Added void return type.
 * `#include <malloc.h>` => `#include <stdlib.h>`

PS.Since I don't know how to install the Utah Raster Toolkit on Mac/Linux, I haven't tested the AALines example.