I would render it out as QuickTime Animation and then bring it into another program and export as H.264 from there. I use VisualHub for most of my compression needs, its free sibling
iSquint only encodes MPEG-4/H.264 and I find it makes much better looking files at lower bitrates than QuickTime and After Effects' H.264 encoders.
iSquint is marketed as an iPod/iTunes encoder, but you can open the Advanced window for more options than iPod presets.
It's an extra step(s) than just picking a different Output Module, but I find that the results are worth it.