bugfixes after build tests on Windows with YARP_USE_GTK2 and CREATE_SHARED_LIBRARY

Small bugfixes that I applied while testing recent changes on Windows; need to be cross-checked on other systems, especially the FindFreetype.cmake, for which a patch should be submitted to CMake