Call Gd.ensure_types

This ensures that gd symbols get pulled in, instead of being stripped
due to the static linking of libgd.