Singular metrics and the Hodge conjecture