Merge remaining Zentyal changes to openchange master and gets everything sync'ed

Why is this necessary? Do we include something else that defines _GNU_SOURCE? A comment would be great.