Improve symmtovec speed. Compat with SymPy changes.