Fix compilation errors for linux port.