drivers/mtd: Move conditional compilation to Makefile