Use a global mutex to avoid race-conditions in shader compiler

Travis builds are no longer randomly failing.