Use -fPIC for GCC only

TODO: Do we need the same for CLang?
Get rid of unsecure functions usage when building with MSVC