Get bitmap.c compiling under 3.2. Some ifdefs may help make it more general