Fix for 32-bit ganglia compilation.  Also made gangliad support arbitrary ad types. #3515