Fix incorrect use of getenv() before relocation