adding handling of gl version < 2.1. Fixes #624