Phase-matched optical second harmonic generation in a hyperbolic metamaterial based on silver nanorods