Handle the case where extra_env=None (e.g. with MariaDB).