Cross compilation fixes for modern Ubuntu distros