TeX writer: Improved logic for array-like environments.

* Ensures that if we don't have amsmath, we ONLY use array.