Fix build failure when environment variables are not set