Work around bugs in Apple GCC 4.0.1

Still miscompiles things.