Cantor families of periodic solutions of wave equations with C^k nonlinearities