Fix Xcode 4.6 warnings/errors

Building in Xcode 4.6 shows a couple of errors and warnings. This PR fixes them.