OS X: Fix a few warnings that will likely become errors

- Fixed a warning about perror and Com_Printf being undefined in macosx/macosx.m
- Fixed a warning about dirname being undefined (when we shouldn't even use it in linux) in unix/unix_shared.c
- Fixed a warning about array bounds in botai/ai_team.c
- Fixed a warning about M_PI being already defined in math_vector.cpp