modifications for cross compilation on Linux