Fix various 64bit issues on 2.0-compat branch

This fixes crashes on 64bit devices caused by [changes to objc_msgSend function calls](https://developer.apple.com/library/ios/documentation/General/Conceptual/CocoaTouch64BitGuide/ConvertingYourAppto64-Bit/ConvertingYourAppto64-Bit.html#//apple_ref/doc/uid/TP40013501-CH3-SW26).

It also fixes a few string formatting and loss of precision warnings.