Merge pull request #1974 from jimis/3.6.x

Needed changes for source tarball.
For building 3.6.2 RC