fix build for cross compilation between 2.9 and 2.10