We can add something like this to the beginning of the file:

```bash
if ! type -t _get_comp_words_by_ref >/dev/null
then
    _get_comp_words_by_ref()
    {
        # Copy/paste implementation from bash_completion
    }
fi
```