Fixes cross compilation issues