10.9 fixes

Found these problems while compiling with 10.9 SDK.