Actually generate random certificate serials (fixes #361)