Electron localization in a two-dimensional system with random magnetic flux