add workarounds for cross-compilation