Fix compile errors in XCode 5