NEW Adding <3.1 support to the environment file

In SS <3.1 you have to define `global $database` with the database name.