Fix a bunch of Linux compilation problems.

There's more...