quad_form fails for certain matrices

Quadform fails for certain matrices that are positive semi-definite. The sqrtm function sometimes returns a complex matrix, with all imaginary parts 0. Truncating the imaginary part solves that problem.
![screenshot from 2014-12-04 01 26 37](https://cloud.githubusercontent.com/assets/1855120/5296085/b5ba87b6-7b54-11e4-8d43-b554854a5c54.png)