Do not pass -fPIC on Windows. Add msys as a host_os value to detect Windows as well.