Merge pull request #635 from davidmmiller/master

fixes for Gentoo amd64 and i686