Fix compilation on Solaris
Merge pull request #2198 from dmcdougall/fix_solaris_compile

Fix compilation on Solaris
Merge remote-tracking branch 'upstream/v1.2.x' into v1.3.x
fixed an enconding bug when checking for gs version
Merge remote-tracking branch 'upstream/v1.3.x'