Fix for issue #535.

The symbols must have weak_odr linkage if they result from a template instantiation.
Merge branch 'master' into merge-2.064