Security of quantum key distribution using weak coherent states with nonrandom phases