NEW Adding <3.1 support to the environment file

In SS <3.1 you have to define `global $database` with the database name.
Merge pull request #4 from dhensby/patch-4

NEW Adding <3.1 support to the environment file