updated -nogl patch to match changes in trunk