Fix -fPIC build issue on non-mingw32/cygwin