Fixed build scripts on OSX to only apply C++ options for C++ files.