Linux compatibility fixes