Fix for cov() failing when a complex input matrix is given

Fix for issue #2680