Changes to get code compiling under Mountain Lion