Properly initialize the OpenGL version functions

Side effects into Q_ASSERTs won't work in release mode

Change-Id: I14eb3cc9f0ddc578c03f3d9cc952ce30485c7702
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>