Measurement of angular parameters from the decay $\mathrm{B}^0 \to \mathrm{K}^{*0} \mu^+ \mu^-$ in proton-proton collisions at $\sqrt{s} = $ 8 TeV