Fix linux build and various warnings.

Increase savestate version.