Fix Ubuntu detection at build configure stage