Fixed compile errors with XCode 6.1.1

Fixed some compile errors when using it with XCode 6.1.1.