Comparison between ZnO nanowires grown by chemical vapor deposition and hydrothermal synthesis