fix link error / compile warnings with newer gcc
Merge branch 'master' into memov