build: allow CORES to be an environment variable