Don't rely on ENV. Fixes #532