use Qt5Gui_OPENGL_LIBRARIES if it is defined (Qt 5.1+)