Fix linkage, Redmine #3495
Merge branch 'master' into 3.6