Add environment variable checks to disable gcov