Updated version number for release 4.0.4
Fix issue #763
Updated NEWS for #763
Merge pull request #40 from hintjens/master

Backported fix for #763