I found the solution, minutes after this post! 😉
Just do search and replace on the files :
<compile dir>/php-4.2.3/ext/gd/gd.c
<compile dir>/php-4.2.3/ext/gd/gd_ctx.c
Search: ->free
Replace with: ->gd_free
This seems to resolve the problem!
Good luck,
Hugo
PS-Slackware rules.