Put spdiag() into an anonymous namespace.

This avoids warnings (GCC 4.6) about missing prior function declaration.