fix cross compile issues