You can edit the defconfig files with an editor. The defconfig you need to edit is arch/arm/configs/cyanogenmod_hammerhead_defconfig. Just enable the modules support(CONFIG_MODULES=y) and try again.