Generation of magnetic fluctuations near a shock front in a partially ionized medium