Check if the environ key exists before accessing it (fixes #90)