Fix cross-platform build issues.