Moodle is at fault actually. As you said yourself, Moodle doesn't know about Office file formats, so you have to tell it that docx is to be treated the same as a doc.
See this thread (http://moodle.org/mod/forum/discuss.php?d=71960), particularly the section on modifying lib/filelib.php. This has been added in by default to version 1.9, but you could add this into any version I suspect and it would work.