Fixes to compile on GCC 4.2, as shipped with XCode.