wavelet: do not use unsupported compile flags for OSX
Update revision to 3.6.5.1.