wavelet: do not use unsupported compile flags for OSX
Merge branch 'maint'
Update revision to 3.6.5.1.
Merge branch 'maint'

Used merge strategy -s ours to skip release commit