Wavelet transform as a tool for detection of geomagnetic precursors of earthquakes