Fix libgdiplus crash

This fixes the crash on Mac OSX we were talking about in #monodev with @alexrp, @kumpera and @ranma42.