GAMMA-RAY EXCESS FROM A STACKED SAMPLE OF HIGH- AND INTERMEDIATE-FREQUENCY PEAKED BLAZARS OBSERVED WITH THE MAGIC TELESCOPE