Make bash completion script more portable