Updating to use getenv instead of relying on $_ENV global

With php 5.4 on F17, getenv is the correct way to get environment variables.