We port this modification[1] from libgd into our bundled libgd, because the change makes sense, and we want the code bases to stay in sync as close as possible. We also apply a quick fix to the respective test. [1] <f0a059be6c>
f0a059be6c