Fixed warnings when building for OS X

(shouldn't cause any new problems on iOS either).