getenv errors on lua 5.1.5 under Linux. Change to os.getenv

getenv fails on Lua 5.1.5, Ubuntu version 14.04. Changed to os.getenv