actually... the i experienced this too...
the issue can be resolved by applying a patch to GD...
I unfortunately don't remember where it is...
This patch allows you to build a GD.so ... a shared library,
instead of GD.a, a static library... as soon as you
build the shared version of GD, your problems will be over.
I'll update when i find the code