PriorityQueue: fixed GWT compatibility.

As per request https://github.com/libgdx/libgdx/issues/1991