Magnetic field effect for two electrons in a two-dimensional random potential