Fixes for compiling under OSX 10.9.1