Magnetization and compensation temperature of transition-metal–rare-earth multilayers in a model with long-range interactions