Fixed clang compile warnings in OSX