Fix VisualStudio error by setting gcc specific flags on unix platform only

See http://www.cmake.org/cmake/help/v2.8.8/cmake.html#variable:UNIX
Fix visual studio build unknown library error
Set gcc deprecated/unused flags only on unix platform.

Instead of checking the platform, it would probably be more robust
to check if the compiler support the feature.