Fix segfaults in TextCaptcha on OS X