Update version number, better environment variable detection