Fixed compiler error w/ gcc 4.3.4.  Also fixed compiler error with APPLE defined.