Part of work for #212: Make GD source to be ready for Qt5.

Replaced deprecated to/fromAscii with to/fromLatin1