gltrace: Prevent crash in _glGetDebugMessageLog_length (issue #140).

The function was not being called correctly from glGetDebugMessageLog
(and others).

From the spec the GL function:

  lengths is an array provided by the application and count is the
  maximum number of message that the driver will report into attribute
  array (ie lengths). That mean if the driver report 3 messages only
  lengths[0 to 2] are valid, others part are not valid and could have
  random data.