Fix usage of kern_getenv().