More fixes for cross-compilation