fix memory leaks in glDrawElements (fixes #19)