Fix compilation.

The Matrix is required to be mutable but it also needs to be a reference and
temporaries do not bind to non-const references - thus we need a hack and
cast away the constness.
Removed a warning when rvalue references are not unsed.