Fix environment detection in gulpfile