The Alcock-Paczyński test in redshifted 21-cm maps