Specify -Wno-old-style-cast only for C++.