Fix compilation errors with Xcode 5.1

This change fixes several warnings that are treated as errors under Xcode 5.1. The changes are intended to be as non-invasive as possible, so they don't really fix the underlying issues so much as they tell the compiler not to sweat them.