Various build fixes

These will have to be tested with the build scripts on all platforms
Yes, if glimagesink is a hard dependency. I don't know if you use other 1.2+ API